1. Field of the Invention
The present invention relates to a data processing apparatus for a vehicle and, more particularly, to a data processing apparatus for a vehicle designed to register before-hand data received from outside a vehicle in nonvolatile memory means and to execute predetermined processing of said data with the other data subsequently received from outside the vehicle.
2. Description of the Prior Art
A variety of control parameters, i.e. learned values, which are required for computer-based control of respective vehicular sections, including engine control, are mostly stored in an electrically erasable programmable ROM (EEPROM) backed up by a battery. Writing such data or learned values into the EEPROM takes more time than writing to a conventional RAM, leading to more chances of such writing being encountered by a momentary interruption or drop in battery voltage or sporadic noise or the like. There is problem in that the occurrence of a noise or the like during the writing of the data or learned values from an engine control unit (ECU)to the EEPROM has caused "garbled data" and erroneous learned values to be written into the EEPROM.
In view of the increasing vehicle thefts in recent years, various types of anti-theft apparatuses have been proposed. Among those anti-theft apparatuses, there is one that is designed to immobilize a vehicle by electrical means if an attempt is made to start or drive the vehicle by using an illegitimate key. This is achieved by previously storing an identification code or a key ID code in a key, reading the key ID code when the key is inserted into a key cylinder to start the vehicle, comparing it with a reference ID code prestored in the vehicle, generating an enable signal only when there is a match between both ID codes, and enabling the engine to be started up only when an engine control unit successfully receives that signal, (see for instance, "Car Technology", Vol. 48, No. 8, 1994, pp. 59-64).
An example of such a conventional transponder type immobilizer is shown in FIG. 5. A key 2 includes a memory (not shown) in which a key ID code (for instance, of 64 bits) is prestored, and a transmitter 4 for transmitting the key ID code. The transmitter 4 of the key 2 and a key cylinder 5 are coupled together by, for instance, an induction coil (antenna) 6.
When the key 2 is inserted into the key cylinder and turned to the ignition on position, an ignition switch 7 is closed. In response to this, an immobilizer CPU 13 incorporated in a hybrid IC for immobilizer control (immobilizer HIC) 10 in an engine control unit (ECU) 30 operates, and operating electric power is supplied from a power amplifier of an antenna unit 19 to the transmitter 4 through the induction coil (antenna) 6. The antenna unit 19 is electrically connected to ECU 30 via a pair of connectors 40 and 50, along with terminal devices of the drive and control systems essential to the engine control such as a fuel injection valve 17 and a fuel pump 18. The moment electric power is supplied to the transmitter 4, the transmitter 4 reads the ID code stored in the key 2 and, as shown in FIG. 3, it periodically and continuously sends the ID code in sequence to the key cylinder 5 as long as the ignition switch 7 is kept ON.
The received key ID code is amplified by a power amplifier (not shown) in the antenna unit 19, and read into the immobilizer CPU 13 through an I/F circuit 12 in the immobilizer HIC 10, and temporarily stored in an appropriate ID code register 13B. In an EEPROM 14 of the HIC 10, a unique reference ID code assigned to each vehicle is prestored, and the reference ID code and the key ID code which was read in are compared with each other by a compare unit 13S of the CPU 13. If it is determined that there is a match between the two ID codes or they are in a predetermined relationship, an enable code is transmitted from the compare unit 13S to an engine CPU 16. At the same time, a starter relay is activated to initiate the rotation of a starter motor (not shown).
In a ROM 15 of the engine CPU 16, an engine control program is stored which includes at least an engine control algorithm, an I/O (Input/Output) control algorithm and an anti-theft algorithm. The engine CPU 16 operates according to the engine control program, and discriminates and verifies the reception of an enable code by the anti-theft algorithm. If the enable code is a correct code, engine CPU 16 performs a specific control based on the engine control algorithm for the respective terminal devices such as a fuel injection valve 17, a fuel pump 18 and an ignition control unit 20 on the signal port selected by the I/O control algorithm, thereby to enable the start and running of the vehicle.
If the reference ID code stored in the EEPROM 14 and the key ID code transmitted from the key 2 and read in do not match each other or they are not in a predetermined relationship, the compare function unit 13S does not issue an enable code. Accordingly, the start of the vehicle by the engine CPU 16 is inhibited, and a horn 21 is activated by the CPU 13 to provide an appropriate alarm and display. When the enable code transmitted from the compare unit 13S is not correct code, the start of the vehicle by the engine CPU 16 is also inhibited. Thus, the illegal start-up of the engine and the driving of the vehicle by a wrong key are prevented to ensure the vehicle anti-theft function.
In the transponder type immobilizer described above, it is necessary to register the ID code of the key 2 as the reference ID code on the vehicle, i.e. in the EEPROM 14, beforehand. The registration of the reference ID code is discussed under Japanese Patent Application No. 6-257375 by the present applicant et. al, and it is implemented, for example, as described below.
In the final production step, delivery inspection step, or the like, an arbitrary key 2 which has a key ID code stored therein is inserted into the key cylinder 5 switch of a completed vehicle and turned to activate the ignition switch 7. This causes electric power to be supplied from the antenna unit 19 to the transmitter 4 via the inductive coil, i.e. antenna, 6. The transmitter 4 then reads the ID code stored in the key 2 and sends it to the key cylinder 5. The received key ID code is serially transferred to and read in the immobilizer CPU 13 via the antenna unit 19 and the I/F circuit 12. If the regular registration of the ID code has been implemented according to a predetermined procedure, then the immobilizer CPU 13 registers the key ID code as the reference ID code in the EEPROM 14.
If, however, the battery voltage is momentarily interrupted or abnormally drops, or if a noise happens to occur while the key ID code of the aforesaid key 2 is being transferred in series to the EEPROM 14, then the serial data may be partially "garbled" and an incorrect key ID code may be registered in the EEPROM 14 as a reference ID code. The incorrect key ID code thus registered as the reference key ID code presents a problem in that the engine cannot be started even if the right key is used to start the engine thereafter because the key ID code does not coincide with the reference ID code.